package nc.ui.arap.service;

import java.util.Map;

import nc.ui.ep.dj.DjPanel;
import nc.vo.arap.pub.ArapConstant;
import nc.vo.arap.service.ServiceVO;
import nc.vo.pub.BusinessException;

public class GlUsedCall extends AbstractCall{

	public GlUsedCall(DjPanel djp) {
		super(djp);
	}

	public ServiceVO getServcallVO() {
		callvo=new ServiceVO();
		callvo.setClassname("nc.itf.uap.sf.ICreateCorpQueryService");
		callvo.setMethodname("queryEnabledPeriod");
		callvo.setParamtype(new Class[] {String.class,String.class});
		callvo.setParam(new Object[] {parent.getDjSettingParam().getPk_corp(),"GL"});
		return callvo;
	}

	public void handleResult(Map<String, Object> datas)throws BusinessException {
		Object[] value=(Object[])datas.get(callvo.getCode());
		
		if (value == null || value[0] == null) {
            getParent().getDjSettingParam().m_GlIsUsed = ArapConstant.UFBOOLEAN_FALSE;
        } else
        	getParent().getDjSettingParam().m_GlIsUsed = ArapConstant.UFBOOLEAN_TRUE;
	}

}
